package com.gwgreenway.order.controller;

import com.gwgreenway.order.rpc.FeignGoodsSdkApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/4/3.
 */
@RestController
public class FeignTestController {
    @Autowired
    FeignGoodsSdkApi feignGoodsSdkApi;

    @RequestMapping(value = "/feign/test", method = RequestMethod.GET)
    public String feignTest(Authentication authentication) {
        String name = feignGoodsSdkApi.createUser();
        return name + authentication;
    }
}
